package com.springcloud.openfigen.order.service;

import com.springcloud.commons.entities.CommonResult;
import com.springcloud.commons.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFigenService {

    @RequestMapping(value = "/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable(value = "id") Long id);

    @RequestMapping("/payment/feign/timeout")
    public String paymentFeignTimeOut();
}
